package pri.hillchen.springbootstd.sso.service.impl;

import org.springframework.stereotype.Service;
import pri.hillchen.springbootstd.sso.entity.SystemInfo;
import pri.hillchen.springbootstd.sso.service.SystemService;

import java.util.HashMap;
import java.util.Map;

/**
 * @author:hillchen
 * @DESCRIPTION:
 * @Date: Created in 10:40 2017/12/13 0013.
 */
@Service
public class SystemServiceImpl implements SystemService{
    private Map<String,SystemInfo> systemMap = new HashMap<String,SystemInfo>(){{
        SystemInfo systemInfo1 = new SystemInfo("test1","/test1/login","test1/error");
        SystemInfo systemInfo2 = new SystemInfo("test2","/test2/login","test2/error");
        SystemInfo systemInfo3 = new SystemInfo("test3","/test3/login","test3/error");
        SystemInfo systemInfo4 = new SystemInfo("test4","/test4/login","test4/error");
        put("test1",systemInfo1);
        put("test2",systemInfo2);
        put("test3",systemInfo3);
        put("test4",systemInfo4);
    }};
    @Override
    public SystemInfo getSystemInfo(String systemName) {
        return systemMap.get(systemName);
    }
}
